package main

import "fmt"

func main() {
	var arr = [...]int{39, 58, 190, 284, 29, 504, 79, -2}
	max := arr[0]
	j := 0
	for i := 1; i < len(arr); i++ {
		if arr[i] > max {
			max = arr[i]
			j = i
		}
	}
	fmt.Println("max=", max, "j=", j)
}
